<template>
<h3>child</h3>
<p>{{ title }}</p>
<p>{{ age }}</p>
<button @click="send">发送shuju</button>
</template>

<script setup>
import {ref} from "vue"
const msg=ref("child数据")

const emit=defineEmits(["send"])

function send(){
    emit("send",msg.value)
}

defineProps({
    title:{
        type:String,
        default:""
    },
    age:{
        type:Number,
        default:0
    }
})



</script>